﻿#include "stdafx.h"
#ifdef LK_SOUND_SOUNDEXCEPTION_
namespace LK
{
	namespace Sound
	{
		//默认声道数
		short DefaultChannels=2;
		//默认位数
		short DefaultBits=16;
		//默认样本率
		double DefaultHz=44100;

		/*PString VSoundException::GetDescription(HRESULT hr)
		{
			switch(hr)
			{
#ifdef AUDCLNT_E_NOT_INITIALIZED
			case	AUDCLNT_E_NOT_INITIALIZED:return L"音频流未被成功初始化";
			case	AUDCLNT_E_ALREADY_INITIALIZED:return L"音频流已经初始化过";
			case	AUDCLNT_E_WRONG_ENDPOINT_TYPE:return L"在捕获设备上使用标记：AUDCLNT_STREAMFLAGS_LOOPBACK";
			case	AUDCLNT_E_DEVICE_INVALIDATED:return L"音频设备被拔出，或者与之关联的硬件已改变";
			case	AUDCLNT_E_NOT_STOPPED:return L"音频流尚未停止";
			//case AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED:return "块大小未对齐";
			case	AUDCLNT_E_BUFFER_TOO_LARGE:return L"请求的块大小过大";
			case	AUDCLNT_E_OUT_OF_ORDER:return L"IAudioCaptureClient::GetBuffer与IAudioCaptureClient::Release未能对应";
			case	AUDCLNT_E_UNSUPPORTED_FORMAT:return L"不支持的格式";
			case	AUDCLNT_E_INVALID_SIZE:return L"写入帧数超出请求值";
			case	AUDCLNT_E_DEVICE_IN_USE:return L"音频设备被占用";
			case	AUDCLNT_E_BUFFER_OPERATION_PENDING:return L"正在进行数据流重置导致缓冲块无法访问";
			case	AUDCLNT_E_THREAD_NOT_REGISTERED:return L"线程未注册";
			case	0x8889000d://AUDCLNT_E_NO_SINGLE_PROCESS
				return L"非单一线程";
			case	AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED:return L"设备不允许使用exclusive-mode";
			//case AUDCLNT_E_INVALID_DEVICE_PERIOD:return "exclusive-mode 客户请求的时期大于500毫秒";
			case	AUDCLNT_E_ENDPOINT_CREATE_FAILED:return L"创建音频终端失败，请检查设备是否已插好并启用";
			case	AUDCLNT_E_SERVICE_NOT_RUNNING:return L"Windows音频服务未启动";
			case	AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED:return L"音频流未为事件驱动初始化";
			case	AUDCLNT_E_EXCLUSIVE_MODE_ONLY:return L"仅能用exclusive-mode";
			case	AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL:return L"使用标记：AUDCLNT_STREAMFLAGS_EVENTCALLBACK，但参数 hnsBufferDuration 和hnsPeriodicity不相等";
			case	AUDCLNT_E_EVENTHANDLE_NOT_SET:return L"事件句柄未设置";
			case	AUDCLNT_E_INCORRECT_BUFFER_SIZE:return L"不正确的块大小";
			case	AUDCLNT_E_BUFFER_SIZE_ERROR:return L"exclusive-mode客户请求的块长度超出范围";
			case	AUDCLNT_E_CPUUSAGE_EXCEEDED :return L"长期高CPU使用率";
#endif
			case 0:
			default:return Exception::GetDescription(hr);
			}
		}*/
	}
}
#endif